; (function () {
    /**
     * 负债表的图表
     */
    function liabilities() {
        var chartDom = document.getElementById('liabilities-container');
        var myChart = echarts.init(chartDom);
        var option;

        option = {
            xAxis: {
                type: 'category',
                data: ['四居室', '车贷', '房贷', '借款', '结婚彩礼', '京东白条', '花呗分期']
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    data: [120, 200, 150, 80, 70, 110, 130],
                    type: 'bar'
                }
            ]
        };
        option && myChart.setOption(option);
    }

    function mine(){
        const timeSection = document.querySelector('.mine .title section')
        setInterval(() => {
            timeSection.textContent = new Date().toLocaleString()
        }, 1000);
    }

    /**
     * 主函数
     */
    (function main() {
        liabilities()
        mine()
    })()

})(window)